package com.pbd.shared;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.google.gwt.user.client.rpc.IsSerializable;
@Entity
@Table(name="businesscategoryrelation")
public class BUSINESSCATEGORYRELATION  implements IsSerializable,Serializable{
	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "id")
	private Long id;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "businessCategoryId", insertable = true, updatable = true)
	private BUSINESSCATEGORY businessCategory;
	
	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "partyId", insertable = true, updatable = true)
	private PARTY party;
	
	@Column(name = "isPrimary",  insertable = true, updatable = true)
	private Boolean isPrimary;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public BUSINESSCATEGORY getBusinessCategory() {
		return businessCategory;
	}

	public void setBusinessCategory(BUSINESSCATEGORY businessCategory) {
		this.businessCategory = businessCategory;
	}

	public PARTY getParty() {
		return party;
	}

	public void setParty(PARTY party) {
		this.party = party;
	}

	public Boolean getIsPrimary() {
		return isPrimary;
	}

	public void setIsPrimary(Boolean isPrimary) {
		this.isPrimary = isPrimary;
	}
	
	
}
